package com.zeh.controller;

import com.zeh.pojo.Function;
import com.zeh.service.FunctionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: zeh
 * @Date: 2021/06/22/19:10
 * @Description:
 */
@Controller
public class FunctionShowController {
     @Autowired
     private FunctionService functionService;



    @GetMapping("/function")
    public String all(Model model){
        List<Function> functions = functionService.selectAFunction();
        model.addAttribute("functions",functions);
        return "function";
    }


}
